#include<dirent.h>
#include <string>
#include<vector>

class CEntry{
				std::string name;
				public:
				CEntry(std::string _name):name(_name){}

				public:
				const std::string& Name(){return name;}
	virtual ~CEntry() { } 
};


class IDir: public CEntry{
        public:
        std::vector<CEntry*> ve;
        IDir(std::string _name): CEntry(_name){}
        
        virtual ~IDir();
        typedef std::vector<CEntry*>::iterator iterator;
        iterator begin(){return ve.begin();}
        iterator end(){return ve.end();}
};


class CDir: public IDir{
 				void refresh();
public:
				CDir(std::string _name): IDir(_name) {
                                  if ("." != _name.substr(_name.size()-1) && ".." != _name.substr(_name.size()-2))
					refresh();
                                  // если делать refresh и на эти папки тоже, то зациклимся ;)
				} 

};

class CWikiDump: public IDir{
				void refresh();
				public:
				CWikiDump(std::string n):IDir(n){
							refresh();
			}
};

class CArch: public IDir{
				int refresh();
				public:
				CArch(std::string l):IDir (l){
					refresh();
				}
};
                                                         

         
